import React, { Component } from "react";
import MyMap from "../../compoents/MyMap";
import MyFixNavBar from "../../compoents/MyFixNavBar";
import { connect } from "react-redux";

class Map extends Component {
  NavigationRouteGoBact = () => {
    this.props.history.goBack();
  };

  componentDidMount() {}

  render() {
    const { curCity } = this.props;
    return (
      <div style={{ height: "100%" }}>
        <MyFixNavBar
          navBarName={"地图找图"}
          NavigationRouteGoBact={this.NavigationRouteGoBact}
          customizedBackgroundColor={"#cdf1dc"}
          fontColor={"#314f51"}
        />
        <MyMap curCity={curCity}></MyMap>
      </div>
    );
  }
}

export default connect((state) => {
  return { curCity: state.curCity };
})(Map);
